<?php
	$lang = $_REQUEST["lang"];
	if (isset($lang)) {
    		$lang = strtolower($lang);
	} else {
		$lang = "tr";
	}
	
	if ($lang != "tr") {
		if ($lang != "en") {
			$lang = "tr";		
		}
	}
?>
<!DOCTYPE html>
<html>
    <head>
        <title>NetGis</title>
		<META http-equiv="Content-Type" content="text/html; charset=UTF8">
		<link rel="stylesheet" href="lib/touch/resources/css/sencha-touch.css" type="text/css" />
        <link rel="stylesheet" href="lib/openlayers/style.mobile.css" type="text/css" />		
        <link rel="stylesheet" href="netgis.css" type="text/css" />  
		
        <script type="text/javascript">
            function onLoad() {
                document.addEventListener("deviceready", app.mainLaunch, false);
            }
			
			function drawNetgis(){
				try {
					var context = document.getElementById("canvasId").getContext("2d");
					
					var secondaryColor = "#333333";

					// Create fill gradient
					var gradient = context.createLinearGradient(0, 0, 60, 30);
					gradient.addColorStop(0, secondaryColor);
					gradient.addColorStop(1, secondaryColor);
						
					// Add a shadow around the object
					context.shadowBlur = 10;
					context.shadowColor = "#dcaa09";
					
					// Add text			
					context.textAlign = "center";
					context.textBaseline = "middle";
					context.font = "bold 18px 'Times New Roman', Times, serif";
					context.fillStyle = gradient;
					try{
						context.fillText("NetGis", 30, 10);
					}catch(ex){}
						
					// Fill the path
					context.fillStyle = gradient;
					context.fill();	
				
				} catch (e) {}				
			}
        </script>

        <style>
            h4 {
                background: #F7F7F7;
                font-weight: bold!important;
                margin: 0.5em 0 0!important;
                padding: 5px;
                border: solid #DDD;
                border-width: 1px 0;
            }
            .field {
                background:#FFFFFF;
                font-size: 120%;
                text-indent: -100px;
                border-bottom: 1px solid #DDD;
                padding:0.4em 0.4em 0.4em 100px;
            }
            .field .label {
                display: inline-block;
                color:#666;
                text-align:right;
                text-transform:capitalize;
                width: 100px;
                padding-right:1em;
            }
            .searchList {
                min-height: 150px;
            }
            
            img.minus {
                -webkit-mask-image: url(img/minus1.png);
            }
            img.layers {
                -webkit-mask-image: url(img/list.png);
            }
            .gx-layer-item {
                margin-left: 10px;
            }
            #map {
                width: 100%;
                height: 100%;
                background-color: black;
            }
            .olControlAttribution {
                font-size: 10px;
                bottom: 5px;
                right: 5px;
            }
            
            #title, #tags, #shortdesc {
                display: none;
            }
            .bbox {
            	font-size: 10px;
            }
            .netgis_load {
				position: absolute;
				text-align: center; 
				left:10px; 
				top:10px; 
				padding:2px; 
				z-index:20001; 
				height:auto; 
				font:bold 12px tahoma,arial,helvetica;
			}
			.infobut {
				color: red;
			}
			
        </style>
                
    </head>

	<body>
		<div id='loadingDiv' class="netgis_load">
			<table style="width: 100%; text-align: center;">
				<tr>
					<td align="left">
						<canvas id="canvasId" width="60px" height="30px"></canvas>
						<script>
							drawNetgis();
						</script>				
					</td>
				</tr>
				<tr>
					<td align="left">
						<div id="loading-msg">Resim ve biçim dosyaları yükleniyor...</div>
					</td>				
				</tr>
			</table>					
		</div> 	
    </body>
    
		<!-- sencha touch and phonegap -->
        <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Çekirdek kütüphane yükleniyor...';</script> 
        <script type="text/javascript" src="lib/touch/sencha-touch.js"></script>
        <script type="text/javascript" src="app/lib.ext/touch/Ext.TaskMgr.js"></script>
        <script type="text/javascript" src="app/lib.ext/touch/ux/Ext.form.ux.touch.ColorPickerField.js"></script>
        <script type="text/javascript" src="app/lib.ext/touch/ux/Ext.form.ux.touch.GenericPickerField.js"></script>
        
        <!--  
        <script type="text/javascript" src="phonegap.js"></script>
        <script type="text/javascript" src="PushNotification.js"></script>
        -->
        
		<!-- openlayers -->
		<!--   <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Harita kütüphanesi yükleniyor...';</script> --> 
		<script src="lib/openlayers/OpenLayers.mobile.js"></script>
		<!--  
		<script src="app/lib.ext/openlayers/MapServer.js"></script>
		<script src="app/lib.ext/openlayers/Marker.js"></script>
		<script src="app/lib.ext/openlayers/Icon.js"></script>
		<script src="app/lib.ext/openlayers/Markers.js"></script>
		<script src="app/lib.ext/openlayers/Measure.js"></script>
		-->
		
        <!-- db tile cache -->
        <script type="text/javascript" src="app/lib.ext/openlayers/ext/Grid.js"></script>
        <script type="text/javascript" src="app/lib.ext/openlayers/ext/BrowserStrorage.js"></script>
        <script type="text/javascript" src="app/lib.ext/openlayers/ext/LocalTileStorage.js"></script>
        <script type="text/javascript" src="app/lib.ext/openlayers/ext/TileSQLStorage.js"></script>
        <script type="text/javascript" src="app/lib.ext/openlayers/ext/TileWebStorage.js"></script>
        <script type="text/javascript" src="app/lib.ext/openlayers/ext/Image.js"></script>
		
		
		<!--  <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Açıklama Pencereleri yükleniyor...';</script> -->
		<!--  		
		<script src="app/lib.ext/openlayers/Popup/Popup.js"></script>
		<script src="app/lib.ext/openlayers/Popup/Anchored.js"></script>
		<script src="app/lib.ext/openlayers/Popup/AnchoredBubble.js"></script>
		<script src="app/lib.ext/openlayers/Popup/Framed.js"></script>
		<script src="app/lib.ext/openlayers/Popup/FramedCloud.js"></script>
		-->
		<script src="app/lib.ext/openlayers/ext/popup.js"></script>
		
		<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'NetGis kütüphanesi yükleniyor...';</script>
        <script type="text/javascript" src="app/PrototypeExtensions.js"></script>
        <script type="text/javascript" src="app/app.js"></script>
        <script type="text/javascript" src="app/NG.Resources_<?php echo $lang;?>.js"></script>
        <script type="text/javascript" src="app/NG.bootstrap.js"></script>
        <script type="text/javascript" src="app/sdk/util/flee.js"></script>
        <script type="text/javascript" src="app/sdk/util/XMLWriter.js"></script>        
        <script type="text/javascript" src="app/sdk/util/NG.util.js"></script>
        <script type="text/javascript" src="app/NG.Constants.js"></script>
        <script type="text/javascript" src="app/NG.ext.OpenLayers.js"></script>
        <script type="text/javascript" src="app/stores/netgis.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/IndexController.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/MapViewController.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/WorkspaceListController.js"></script>		
        <script type="text/javascript" src="app/sdk/controllers/WorkspaceFormController.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/SearchViewController.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/InfoViewController.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/SettingsController.js"></script>
        <script type="text/javascript" src="app/sdk/controllers/DenemeController.js"></script>
        
		<script type="text/javascript" src="app/sdk/models/Workspace.js"></script>
		<script type="text/javascript" src="app/sdk/models/Category.js"></script>
		<script type="text/javascript" src="app/sdk/models/Info.js"></script>
		<script type="text/javascript" src="app/sdk/models/Table.js"></script>
		<script type="text/javascript" src="app/sdk/models/Geometry.js"></script>
		<script type="text/javascript" src="app/sdk/models/Settings.js"></script>
		<script type="text/javascript" src="app/sdk/models/NetworkInfo.js"></script>
		<script type="text/javascript" src="app/sdk/stores/NG.stores.putinfoex.js"></script>
		
		<script type="text/javascript" src="app/views/Index.js"></script>
		<script type="text/javascript" src="app/views/InfoActionList.js"></script>
		<script type="text/javascript" src="app/views/MapView.js"></script>
        <script type="text/javascript" src="app/views/Viewport.js"></script>
        <script type="text/javascript" src="app/views/WorkspaceList.js"></script>
        <script type="text/javascript" src="app/views/WorkspaceForm.js"></script>
        <script type="text/javascript" src="app/views/CategoryList.js"></script>
        <script type="text/javascript" src="app/views/FADList.js"></script>
        <script type="text/javascript" src="app/views/SearchView.js"></script>
		<script type="text/javascript" src="app/views/DenemeView.js"></script>
		<script type="text/javascript" src="app/views/Settings.js"></script>
		<script type="text/javascript" src="app/views/InfoView.js"></script>
		<script type="text/javascript" src="app/views/WMSList.js"></script>
		

		<!-- command libs -->
        <script type="text/javascript" src="app/sdk/command/NG.command.ServiceRequester.js"></script>
        <script type="text/javascript" src="app/sdk/command/NG.command.Request.js"></script>
        <script type="text/javascript" src="app/sdk/command/NG.command.GetMap.js"></script>
        <script type="text/javascript" src="app/sdk/command/NG.command.TiledProjectInfo.js"></script>
        <script type="text/javascript" src="app/sdk/command/NG.command.GetCategories.js"></script>
		<script type="text/javascript" src="app/sdk/command/NG.command.NCDDServices.js"></script>
		<script type="text/javascript" src="app/sdk/command/NG.command.GetInfoEx.js"></script>
		<script type="text/javascript" src="app/sdk/command/NG.command.PutInfoEx.js"></script>
		<script type="text/javascript" src="app/sdk/command/NG.command.NetworkInfo.js"></script>
		<script type="text/javascript" src="app/sdk/command/NG.command.ShortestFind.js"></script>
		
		<!-- response libs -->
        <script type="text/javascript" src="app/sdk/response/NG.response.Response.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.TiledProjectInfo.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.GetMap.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.GetCategories.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.NCDDServices.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.GetInfoEx.js"></script>
 		<script type="text/javascript" src="app/sdk/response/NG.response.NetworkInfo.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.ShortestFind.js"></script>
        <script type="text/javascript" src="app/sdk/response/NG.response.PutInfoEx.js"></script>
        
        <script type="text/javascript" src="app/NG.database.js"></script>
    
</html>